package ooday05;
/** 枚举的演示 */
public class EnumDemo {
    public static void main(String[] args) {
        Season[] seasons=Season.values();//获取所有枚举对象
        for (int i = 0; i <seasons.length ; i++) {
            System.out.print(seasons[i]+"\t");
            System.out.println(seasons[i].getSeasonName());
            System.out.println(seasons[i].getSeasonDesc());
            }

        Season season=Season.AUTUMN;//获取对象
        switch (season){
            case AUTUMN:
                System.out.println("天气"+ season.getSeasonDesc()+",放风筝咯");
                break;
            case SPRING:
                System.out.println("天气"+ season.getSeasonDesc()+",游泳去了");
                break;
            case SUMMER:
                System.out.println("天气"+ season.getSeasonDesc()+",吹风去了");
                break;
            case WINTER:
                System.out.println("天气"+ season.getSeasonDesc()+",滑雪去了");
                break;
        }
        }


    }

